
<%@page import="dto.DTO_KhachHang"%>
<%@page import="dto.DTO_SanPham"%>
<%@page import="dto.DTO_GioHang"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>THANH TOÁN</title>
         <link type="text/css" rel="stylesheet" href="css/style.css" />
        <link type="text/css" rel="stylesheet" href="css/nivo-slider.css" />
        <link type="text/css" rel="stylesheet" href="css/default/default.css" />
        <script type="text/javascript" src="js/jquery-1.5.2.js"></script>
        <script type="text/javascript" src="js/myJS.js"></script>
        <script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
        <s:head/>
    </head>
    <body>
        <div id="top-background">
             <div id="page-container">
                 <jsp:include page="template/header.jsp"></jsp:include>
                 <jsp:include page="template/navigation.jsp"></jsp:include>
                 <div id="main-content">
                     <div id="left-content">
                        <div class="title">
                            <p>THANH TOÁN HÓA ĐƠN</p>
                        </div>
                        <div id="left-content-inline">
                            <div class="dssp_thanhtoan">
                                <div id="inline_ds">
                                    <%
                                        DTO_GioHang giohang = (DTO_GioHang)session.getAttribute("GioHang");


                                    %>
                                    <table>
                                        <tr>
                                        <td colspan="3"><h3>Thông tin đơn hàng</h3><br></td>
                                         </tr>
                                        <tr style="background:#66ccff;">
                                            <td width="400px;" style="font-weight: bold;">Tên sản phẩm</td>
                                            <td width="200px;" style="font-weight: bold;">Giá</td>
                                            <td  style="font-weight: bold;">Số lượng</td>
                                        </tr>
                                        <%  for(DTO_SanPham sp : giohang){
                                        %>
                                        <tr>
                                            <td width="400px;"><%= sp.getTenSP() %> </td>
                                            <td width="200px;"><%= sp.getGiaBan() %></td>
                                            <td><%= sp.getSoLuong() %></td>
                                        </tr>
                                        <%}%>
                                    </table>
                                </div>
                                <div id="thanhtoan">
                                    <div style="float:left;">
                                        <div id="tongsp">
                                            <p><font style="color:blue;font-weight: bold;">Tổng sản phẩm : </font> <font style="color:red;font-weight: bold;"><%= session.getAttribute("TongSP") %></font></p>
                                        </div>
                                        <div id="tongtien" >
                                              <p><font style="color:blue;font-weight: bold;">Tổng tiền : </font><font style="color:red;font-weight: bold;"><%= session.getAttribute("TongTien") %> VNĐ</font></p>
                                        </div>
                                    </div>
                                </div>
                                        <%
                                            DTO_KhachHang dtoKH = (DTO_KhachHang)session.getAttribute("KhachHang");
                                        %>
                                <s:form name="abc" action="ThanhToan" method="POST">
                                <table style="margin: -30px auto;">
                                    <tr>
                                        <td colspan="3"><h3>Thông tin giao hàng</h3><br></td>
                                    </tr>
                                    <tr>
                                        <td>Tên khách hàng : </td>
                                        <td><%= dtoKH.getHoTen() %></td>
                                    </tr>
                                    <tr>
                                        <td>Email : </td>
                                        <td><%= dtoKH.getEmail() %></td>
                                    </tr>
                                    <tr>
                                        <td>Địa chỉ : </td>
                                        <td><%= dtoKH.getDiaChi() %></td>
                                    </tr>
                                    <tr>
                                        <td>Số điện thoại : </td>
                                        <td><%= dtoKH.getDienThoai() %></td>
                                    </tr>
                                    <tr>
                                        <td>Ngày giao hàng : </td>

                                        <td><s:textfield name="ngaygiao" cssStyle="width:250px;height:25px;" /></td>
                                    </tr>
                                    <tr style="width: 400px;">
                                        <td>Địa chỉ giao hàng : </td>
                                        <td><s:textarea name = "diachi" cssStyle="min-width:400px;max-width:400px;"/> </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td><input type="submit" name="txtXacNhan" value="Đồng ý" /></td>

                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td><p><s:actionerror/></p></td>
                                    </tr>
                                </table>
                          </s:form>
                            </div>
                        </div>
                     </div>
                     <jsp:include page="template/right_content.jsp"></jsp:include>
                 </div>
                 <div style="clear: both;"></div>
                 <jsp:include page="template/footer.jsp"></jsp:include>
             </div>
        </div>
    </body>
</html>
